package com.group.exception;

import com.group.result.ResultEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * com.gxa.exception
 * User: 恩哲欣
 * Date: 2024/10/17 16:51
 * Motto: Where there is a will, there is a way!
 * Description:
 * Version: V1.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
public class CustomerException extends RuntimeException{
    private static final long serialVersionUID = 7192848270281002996L;
    //定义异常信息
    private String message;
    private ResultEnum resultEnum;

    public CustomerException(ResultEnum resultEnum) {
        super();
        message = resultEnum.getMessage();
    }
}
